#include "../head.h"

/*需修改 播放 / 暂停 / 退出 图标*/
/*视频播放器模块*/

void video_player()
{
    int flag1 = 1, flag2 = 1;
    play_video_backstage("death/StarRailway.mp4");       //media/dz.mp4
    while (flag1)
    {
        struct cor p;
        p = get_touch();
        if (p.x >= 450 && p.x <= 540 && p.y >= 520 && p.y <= 600) // click the bofang
        {
            if (flag2 == 1)
            {
                show_bmp(0,440,"death/play.bmp");      //暂停
                pause_video();
                flag2 = 0;
            }
            else
            {
                show_bmp(0,440,"death/pause.bmp");
                continue_video();
                flag2 = 1;
            }
        }
        else if (p.x >= 0 && p.x <= 80 && p.y >= 520 && p.y <= 600) // click the tingzhi
        {
            stop_video();
            flag1 = 0;
            return;
        }
    }
}